package com.candy.databasedocuments.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * @author suYanLong
 * @version 1.0
 * @date 2023/7/5 14:30
 * @Description 配置
 */
@Configuration
@ConfigurationProperties(prefix = "db-document")
public class DatabaseConfig {

    @NestedConfigurationProperty
    private DbAttr dbAttr = new DbAttr();

    @NestedConfigurationProperty
    private DcAttr dcAttr = new DcAttr();

    public DbAttr getDbAttr() {
        return dbAttr;
    }

    public void setDbAttr(DbAttr dbAttr) {
        this.dbAttr = dbAttr;
    }

    public DcAttr getDcAttr() {
        return dcAttr;
    }

    public void setDcAttr(DcAttr dcAttr) {
        this.dcAttr = dcAttr;
    }

}
